<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="contextPath" value="<%=request.getContextPath()%>"></c:set>       
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>老A在线考试系统</title>
  <meta name=description content="在线考试系统">
  <meta name=viewport content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="${contextPath}/static/assets/css/bootstrap.min.css" />
  <script src='${contextPath}/static/assets/js/jquery.min.js'></script> 
  <script src="${contextPath}/static/assets/js/bootstrap.min.js"></script>
  <script src="${contextPath}/static/assets/js/student/testExam.js"></script>
     <style type='text/css'>
      body {
        background-color:#67686d;
      }
      .container{
        padding:50px;
        background-color:#ffffff;
      }
      .testType{
      display:inline-block;
      width:48px;
      height:20px;
      background-color:#fffed2;
      }

   </style>
<%
		String path = request.getContextPath();
		request.setAttribute("path", path);
		%>   
</head>
<body>
<input type="hidden" id="path" value="${path}">
<input type="hidden" id="remainTime" value="${remainTime}">
<input type="hidden" id="sub_id" value="${subject.sub_id}">

<div class="container">
    <div class="row">
        <div class="span12">
            <h2 class="text-center">
                【无风险测试】老A在线考试系统
            </h2>
        </div>
        <hr/>
     <div class="alert alert-dismissable alert-info">
                 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                本次考试的参考时长为：<strong>${subject.total_time }</strong>分钟 &nbsp; 总分为 ： <strong>${subject.total_score }</strong>分 &nbsp;剩余考试时间为：<strong id="testTimer"></strong>
    </div>
<form class="form-horizontal">
	<c:forEach items="${resultList}" var="testVO" varStatus="status">
		<c:choose>
			<c:when test="${testVO.examTestTypeVO.id == 1 }">
			<p><label>${status.count}、</label>&nbsp;&nbsp;<label class="testType">${testVO.examTestTypeVO.testType}</label>&nbsp;<label>(${testVO.examTestTypeVO.testTypeScore} 分)</label>&nbsp;<label>${testVO.content}</label>（）</p>
				<div class="radio">
				    <label>
				       <input type="radio" name="${status.count}" id="optionsRadios1" value="A"> A 、 ${testVO.chooseA }
				    </label>
				</div>
				<div class="radio">
				    <label>
				         <input type="radio" name="${status.count}" id="optionsRadios2" value="B">B 、 ${testVO.chooseB }
				    </label>
				</div>
				<div class="radio">
				    <label>
				         <input type="radio" name="${status.count}" id="optionsRadios3" value="C">C 、 ${testVO.chooseC }
				    </label>
				</div>
				<div class="radio">
				    <label>
				       <input type="radio" name="${status.count}" id="optionsRadios4" value="D"> D 、 ${testVO.chooseD }
				    </label>
				</div>
				<hr />
			</c:when>
           <c:otherwise>										      
           <p><label>${status.count}、</label>&nbsp;&nbsp;<label class="testType">${testVO.examTestTypeVO.testType}</label>&nbsp;&nbsp;<label>(${testVO.examTestTypeVO.testTypeScore} 分)</label>&nbsp;&nbsp;<label>${testVO.content}</label>（）</p>
           
			<div class="checkbox">
			    <label><input type="checkbox" name="${status.count}" value="A">A 、${testVO.chooseA }</label>
			</div>
			<div class="checkbox">
			    <label> <input type="checkbox" name="${status.count}" value="B">B 、${testVO.chooseB }</label>
			</div>
			<div class="checkbox">
			    <label><input type="checkbox" name="${status.count}" value="C">C 、${testVO.chooseC }</label>
			</div>
			<div class="checkbox">
			    <label><input type="checkbox" name="${status.count}" value="D">D 、${testVO.chooseD }</label>
			</div>
			<hr />
			<c:choose>
			<c:when test="${status.last}">
			<input type="hidden" id="listLength" value="${status.count}">		
		   </c:when>
		   </c:choose>		  
           </c:otherwise>
           
           </c:choose>

</c:forEach>
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span12">
			 <button class="btn btn-block btn-large btn-info" id="testForm" type="button">提交</button>
		</div>
	</div>
</div>	  
</form>
    </div>
</div>
</body>
</html>